package com.paul.sys.service.impl;

import com.paul.sys.mapper.FieldParkInfoMapper;
import com.paul.sys.model.FieldParkInfo;
import com.paul.sys.service.FieldParkInfoService;
import com.paul.sys.tools.CommPageBean;
import com.paul.sys.tools.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class FieldParkInfoServiceImpl implements FieldParkInfoService {

    @Autowired
    private FieldParkInfoMapper filedParkInfoMapper;

    @Override
    public FieldParkInfo selectByPrimaryKey(String uuid){
        return filedParkInfoMapper.selectByPrimaryKey(uuid);
    }
    @Override
    public int insert(FieldParkInfo record){
        return filedParkInfoMapper.insert(record);
    }

    @Override
    public int updateByPrimaryKey(FieldParkInfo fieldParkInfo) {
        return filedParkInfoMapper.updateByPrimaryKeySelective(fieldParkInfo);
    }


    @Override
    public Integer countAll(Map param) {
        return filedParkInfoMapper.countAll(param);
    }


    @Override
    public PageData<FieldParkInfo> listByPage(Map<String, String> param) {
        PageData<FieldParkInfo> pageData = new PageData<FieldParkInfo>();
        CommPageBean pageBean = CommPageBean.getPageBeanByParam(param);
        List<FieldParkInfo> list = filedParkInfoMapper.listByPage(param, pageBean);
        pageData.setPageBean(pageBean);
        pageData.setListData(list);
        return  pageData;
    }

}